﻿using System;
using System.Configuration;

namespace Rendiciones.Web.infraestructura
{
    public class Configuracion
    {
        public static string ConnectionString { get { return ConfigurationManager.ConnectionStrings["ConnStr"].ConnectionString; } }
        public static string Prefijo { get { return ConfigurationManager.AppSettings["Prefijo"]; } }
        public static int SesionTimeOut { get { return Int32.Parse(ConfigurationManager.AppSettings["SesionTimeOut"]); } }
        public static string ServerSmtpMail { get { return ConfigurationManager.AppSettings["ServerSmtpMail"]; } }
        public static string ServerSmtpServer { get { return ConfigurationManager.AppSettings["ServerSmtpServer"]; } }
        public static string ServerSmptUser { get { return ConfigurationManager.AppSettings["ServerSmptUser"]; } }
        public static string ServerSmptPassword { get { return ConfigurationManager.AppSettings["ServerSmptPassword"]; } }

        public static bool MostrarErrorCompleto
        {
            get
            {
                try
                {
                    return ConfigurationManager.AppSettings["MostrarErrorCompleto"].ToLower().Equals("true");
                }
                catch
                {
                    return false;
                }
            }
        }
        
    }
}